home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games Extra 1996 September
/
Amiga Games Extra CD-ROM 9-1996.iso
/
userbox
/
publicdomain
/
fastimagefxmodules
/
makeanim.rx
< prev
next >
Wrap
Text File
|
1995-12-10
|
2KB
|
80 lines
/* MakeAnim.rx © by Helmut Hoffmann 1995 */
/* Make HHsYUVSq animation from a directory of pictures */
/* with ImageFX or EGSImageFX */
OPTIONS RESULTS
CLOSE(STDERR)
win=OPEN(STDERR,'NIL:')
if ~(ADDRESS()='REXX') then do
CLOSE(STDOUT)
win=OPEN(STDOUT,'CON:0/50//130/MakeAnim.rx/CLOSE')
end
else do
if ~SHOW('p','IMAGEFX.1') then do
if ~SHOW('p','EGS_IMAGEFX.1') then do
say "This script needs a running ImageFX or EGSImageFX"
say "and HHsFastIFXModules (the saver) to create animations"
exit
end
else ifxport='EGS_IMAGEFX.1'
end
else ifxport='IMAGEFX.1'
address value ifxport
end
'GetPrefs LoadPath'
LoadPath=result
'GetPrefs SavePath'
SavePath=result
address command 'requestfile drawer "'LoadPath'" noicons title "Select source directory:" >ENV:HHsYUVAnimSource'
if rc~=0 then exit
address command 'requestfile drawer "'SavePath'" savemode noicons pattern ~(#?.info) title "Select animation file:" >ENV:HHsYUVAnimFile'
if rc~=0 then exit
address command 'list $HHsYUVAnimSource pat ~(#?.info) files lformat %f%n >t:HHsAnimList'
address command 'sort t:HHsAnimList to t:HHsAnimListS'
if (open(SourceList,'t:HHsAnimListS','READ')=0) then do
say "Can't read file list"
exit
end
if (open(DestList,'ENV:HHsYUVAnimFile','READ')=0) then do
say "Can't read dest file name"
exit
end
destanim=READLN(DestList)
say "Creating animation:" destanim
DO FOREVER
sourcefile=READLN(SourceList)
if length(sourcefile)=0 then do
say "Finished."
exit
end
say "Processing file" sourcefile
'LoadBuffer "'sourcefile'" force'
if rc~=0 then exit
'GetMain'
if rc~=0 then exit
parse var result '"' bufname '"' xdim ydim more
say "Size:" xdim ydim
scalefac=min(36000/xdim,31000/ydim)
if (scalefac<100) then do
say "Downscaling:" scalefac||"%"
'Scale 'scalefac scalefac ' percent'
if rc~=0 then do
say "Scaling failed!"
exit
end
end
'SaveBufferAs Format "-HHsYUVSq animation-" File 'destanim
if rc~=0 then exit
END